/*
 * Copyright (c) 2021. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan. 
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna. 
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus. 
 * Vestibulum commodo. Ut rhoncus gravida arcu. 
 */

import java.util.Scanner;

/**
 * 条件运算符
 */
public class Demo07 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入两个整数a,b:");
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = 0;//保存较大的数
//        c = a>b?a:b;
        c=a;
        boolean temp = a>b || (c=b)>0;

        System.out.println("较大的数:"+c);

        short x = 1;
//        x = x + 1;//编译错误
        x = (short)(x+ 1);
        x += 1;
    }
}
